#ifndef WORK_THREAD_H
#define WORK_THREAD_H

#include "Thread.h"
#include "Common.h"
#include "shared_ptr.hpp"

#include <map>
#include <string>

class WorkThread : public Thread
{
    private:
        int ParseReq(std::map<std::string, int>& params,
            std::string& text, int fd,
            boost::shared_ptr<byte>& buf);

        int WriteResponse(int fd, const boost::shared_ptr<Item>& item,
            boost::shared_ptr<byte>& buf, std::map<std::string, int>& params);

    public:
        virtual void* Process();
};

#endif
